/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package logging.report;

import java.util.Arrays;
import java.util.List;
import pgentity.User;

/**
 *
 * @author Salm
 */
public class ActionRecord extends DataRecord {
    public ActionRecord(User actor, long time, UserAction act,
            Object... actData) {
        super(PGLogCategory.HANHDONG, actor, time,
                parseAction(act, actData), 20);
    }
    
    private static List<Object> parseAction(UserAction act, Object[] actData)
    {
        Object[] data = new Object[actData.length + 1];
        data[0] = act;
        System.arraycopy(actData, 0, data, 1, actData.length);
        
        return Arrays.asList(data);
    }
}